package com.hrms.controller.employee;

import com.hrms.http.ResponseResult;
import com.hrms.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;

@Transactional
@RestController
@RequestMapping("/employee/history")
public class EmployeeHistoryController {
    // 员工历史订单

    @Autowired
    private OrdersService ordersService;

    @RequestMapping("/init")
    public ResponseResult<List<Map<String, Object>>> init() {
        // 初始化
        List<Map<String, Object>> list = ordersService.selectbyEmployee();
        return new ResponseResult<>("SUCCESS", list);
    }
}
